<?php /* Smarty version Smarty-3.1.12, created on 2016-07-11 14:18:37
         compiled from "D:\phpStudy\WWW\demonew\dm\xycms\getkey.tpl" */ ?>
<?php /*%%SmartyHeaderCode:335957833a3defd8f7-53310176%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'd2544134d80c1530bb4f5f12aefe21e4889a62c0' => 
    array (
      0 => 'D:\\phpStudy\\WWW\\demonew\\dm\\xycms\\getkey.tpl',
      1 => 1468207875,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '335957833a3defd8f7-53310176',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'page_charset' => 0,
    'copyright_author' => 0,
    'action' => 0,
    'total' => 0,
    'keyarry' => 0,
    'volist' => 0,
    'w_automatic' => 0,
    'lists' => 0,
    'id' => 0,
    'keywords' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.12',
  'unifunc' => 'content_57833a3e0aeb43_25774379',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_57833a3e0aeb43_25774379')) {function content_57833a3e0aeb43_25774379($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'D:\\phpStudy\\WWW\\demonew\\source\\core\\plugins\\modifier.date_format.php';
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $_smarty_tpl->tpl_vars['page_charset']->value;?>
" />
<title>关键词库</title>
<meta name="author" content="<?php echo $_smarty_tpl->tpl_vars['copyright_author']->value;?>
" />
<link type="text/css" rel="stylesheet" href="xycms/css/admin.css" media="screen" />
<script type='text/javascript' src='js/jquery-1.8.3.min.js'></script>
<script type='text/javascript' src='js/command.js'></script>
<script type="text/javascript" src='../data/editor/kindeditor.js'></script>
<link rel="stylesheet" href="../data/ueditor/themes/default/css/ueditor.css" type="text/css">
<script type="text/javascript" charset="utf-8" src="../data/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="../data/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../data/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<?php if ($_smarty_tpl->tpl_vars['action']->value=="show"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：系统设置<span>&gt;</span>自动关键词库</p></div>
  <div class="main-cont">
    <h3 class="title">自动关键词库(<?php echo $_smarty_tpl->tpl_vars['total']->value;?>
)</h3>
	<ul class="keylist">
		<?php  $_smarty_tpl->tpl_vars['volist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['volist']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['keyarry']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['volist']->key => $_smarty_tpl->tpl_vars['volist']->value){
$_smarty_tpl->tpl_vars['volist']->_loop = true;
?>
		<li><?php echo $_smarty_tpl->tpl_vars['volist']->value;?>
</li>
		<?php } ?>
	</ul>
  </div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="configure"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：系统设置<span>&gt;</span>关键词库配置</p></div>
  <div class="main-cont">
    <h3 class="title">关键词库配置</h3>
	<form name="myform" id="myform" method="post" action="xycms_getkey.php" >
		<input type="hidden" name="action" value="saveconfig" />
		<table class='table_form'>
		  <tr>
			<th width="100">广泛匹配查询 <span class='f_red'></span></th>
			<td colspan="2">
				<label><input type="radio" name="w_automatic" id="w_automatic" value="1" <?php if ($_smarty_tpl->tpl_vars['w_automatic']->value==1){?>checked="checked"<?php }?> />&nbsp;&nbsp;开启</label><div class="w_automatic">&nbsp;&nbsp;&nbsp;&nbsp;( 区域匹配、后缀词、主词、分类词、产品词、扩展词库 )</div>
			</td>
		  </tr>
		  <tr>
			<th>精确匹配查询 <span class='f_red'></span></th>
			<td colspan="2">
				<label><input type="radio" name="w_automatic" id="w_automatic2" value="2" <?php if ($_smarty_tpl->tpl_vars['w_automatic']->value==2){?>checked="checked"<?php }?> />&nbsp;&nbsp;开启</label><div class="w_automatic">&nbsp;&nbsp;&nbsp;&nbsp;( 主词、分类词、产品词、扩展词库 )</div>
			</td>
		  </tr>
		  <tr>
			<th></th>
			<td colspan="2"><input type="submit" name="btn_save" id="btn_save" class="button" value="更新保存" /></td>
		  </tr>
		</table>	
	</form>
  </div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="lists"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：系统设置<span>&gt;</span>手动关键词库</p></div>
  <div class="main-cont">
    <h3 class="title"><a href="xycms_getkey.php?action=add" class="btn-general">添加关键词</a>手动关键词库 [ 热推产品 ] </h3>
	<form action="xycms_getkey.php" method="post" name="myform" id="myform" style="margin:0">
	<input type="hidden" name="action" id="action" value="del" />
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table" align="center">
	  <thead class="tb-tit-bg">
	  <tr>
	    <th width="50"><div class="th-gap">选择</div></th>
		<th><div class="th-gap">关键词</div></th>
		<th width="20%"><div class="th-gap">图标</div></th>
		<th width="200"><div class="th-gap">录入时间</div></th>
		<th width="200"><div class="th-gap">操作</div></th>
	  </tr>
	  </thead>
	  <tfoot class="tb-foot-bg"></tfoot>
	  <?php  $_smarty_tpl->tpl_vars['volist'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['volist']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['lists']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['volist']->key => $_smarty_tpl->tpl_vars['volist']->value){
$_smarty_tpl->tpl_vars['volist']->_loop = true;
?>
	  <tr onmouseover="overColor(this)" onmouseout="outColor(this)">
	    <td align="center"><input name="id[]" class="id" type="checkbox" value="<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" onclick="checkItem(this, 'chkAll')" /></td>
		<td ><a href="<?php echo $_smarty_tpl->tpl_vars['volist']->value['url'];?>
" target="_blank"><?php echo $_smarty_tpl->tpl_vars['volist']->value['wname'];?>
</a></td>
		<td align="center"><?php if ($_smarty_tpl->tpl_vars['volist']->value['thumbfiles']!=''){?><img class="p_cate_img" src="../<?php echo $_smarty_tpl->tpl_vars['volist']->value['thumbfiles'];?>
" border="0" /><?php }else{ ?><font color="#999999">无图标</font><?php }?></td>
		<td align="center"><?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['volist']->value['timeline'],"%Y-%m-%d");?>
</td>
	    <td align="center"><a href="xycms_getkey.php?action=edit&id=<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" class="icon-edit">修改</a>&nbsp;&nbsp;<a href="xycms_getkey.php?action=del&id[]=<?php echo $_smarty_tpl->tpl_vars['volist']->value['id'];?>
" onclick="{if(confirm('确定要删除该信息?')){return true;} return false;}" class="icon-del">删除</a></td>
	  </tr>
	  <?php }
if (!$_smarty_tpl->tpl_vars['volist']->_loop) {
?>
      <tr>
	    <td colspan="5" align="center">暂无信息</td>
	  </tr>
	  <?php } ?>
	  <?php if ($_smarty_tpl->tpl_vars['total']->value>0){?>
	  <tr>
		<td align="center"><input name="chkAll" type="checkbox" id="chkAll" onclick="checkAll(this, 'id[]')" value="checkbox" /></td>
		<td class="hback" colspan="4">
        <input class="button" name="btn_del" type="button" value="删 除" onclick="{if(confirm('确定删除选定信息吗!?')){$('#action').val('del');$('#myform').submit();return true;}return false;}" class="button" />&nbsp;&nbsp;共[ <b><?php echo $_smarty_tpl->tpl_vars['total']->value;?>
</b> ]条记录
        </td>
      </tr>
	  <?php }?>
	</table>
	</form>
  </div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="add"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：系统设置<span>&gt;</span>添加关键词</p></div>
  <div class="main-cont">
	<h3 class="title title_padding"><a href="xycms_getkey.php?action=lists" class="btn-general">返回列表</a><span class="pro_hover">手动关键词基本信息</span><span>手动关键词配置信息</span></h3>
    <form name="myform" id="myform" method="post" action="xycms_getkey.php" onsubmit='return checkform();' >
    <input type="hidden" name="action" value="saveadd" />
	<table class='table_form'>
	  <tr>
		<th width="90">关键词名称：<span class='f_red'>*</span></th>
		<td colspan="2"><input type="text" name="wname" id="catename" class="input-txt" /> <span class='f_red' id="dcatename"></span></td>
	  </tr>
	  <tr>
		<th width="110">自定义目录：<span class='f_red'>*</span></th>
		<td colspan="2">
		<input type="text" name="word" id="word" class="input-txt word_url" /> 
		<span id="word_btn">自动获取</span>
		<span class='f_red' id="wordname"></span>( 必须是是英文字符串组成 )	
		</td>
	  </tr>
	  <tr>
		<th>样式图片：<span class="f_red"></span> </th>
		<td style="width:305px;">
		  <input type="hidden" name="uploadfiles" id="uploadfiles" />
		  <input type="hidden" name="thumbfiles" id="thumbfiles" />
		  <img class='upload_img' /><a href="javascript:void(0)" class="pic_remove">删除</a>
		  <iframe id='iframe_t' frameborder='0' scrolling='no' width='305' height='25' src='upload_input.php?filepath=product'></iframe>
        </td>
        <td style=""></td>
	  </tr>
	  <tr>
		<th>参数设置：<span class='f_red'></span></th>
		<td colspan="2"><label><input type="checkbox" name="flag" id="flag" value="1" checked="checked" />&nbsp;&nbsp;状态</label></td>
	  </tr>
	  <tr>
		<th>相关关键词：</th>
		<td colspan="2"><input type="text" name="tag" id="tag" class="input-txt" /> <span id="smart_keywordsnews">自动选择</span> <span id='dtag' class='f_red'></span> (多个请用英文,号隔开)</td>
	  </tr>
	  <tr>
		<th>详细介绍：</th>
		<td colspan="2">
		  <script id="container" name="content" type="text/javascript"></script>
		  <script type="text/javascript">var ue = UE.getEditor('container');</script>
		  <span id='dcontent' class='f_red'></span>
		</td>
	  </tr>
	</table>
	<table class='table_form' style="display:none;">
	  <tr>
		<th width="110">Title：<span class='f_red'></span></th>
		<td><input type="text" name="wtitle" id="wtitle" class="input-txt" /> <span class='f_red' id="dcatename"></span></td>
	  </tr>
	  <tr>
		<th width="110">Keywords：<span class='f_red'></span></th>
		<td><input type="text" name="wkeywords" id="wkeywords" class="input-txt" /> <span class='f_red' id="dcatename"></span></td>
	  </tr>
	  <tr>
		<th>Description：</th>
		<td>
			<textarea name="wdescription" id="wdescription" style='width:60%;height:65px;overflow:auto;color:#444444;'></textarea><br />（200字符以内）
		</td>
	  </tr>
	</table>
	<table class='table_form'>
	  <tr>
		<th width="110"></th>
		<td><input type="submit" name="btn_save" class="button" value="添加保存" /></td>
	  </tr>
	</table>
	</form>
  </div>
  <div style="clear:both;"></div>
</div>
<?php }?>

<?php if ($_smarty_tpl->tpl_vars['action']->value=="edit"){?>
<div class="main-wrap">
  <div class="path"><p>当前位置：系统设置<span>&gt;</span>修改关键词</p></div>
  <div class="main-cont">
	<h3 class="title title_padding"><a href="xycms_getkey.php?action=lists" class="btn-general">返回列表</a><span class="pro_hover">手动关键词基本信息</span><span>手动关键词配置信息</span></h3>
    <form name="myform" id="myform" method="post" action="xycms_getkey.php" onsubmit='return checkform();' >
    <input type="hidden" name="action" value="saveedit" />
    <input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['id']->value;?>
" />
		<table class='table_form'>
	  <tr>
		<th width="90">关键词名称：<span class='f_red'>*</span></th>
		<td colspan="2"><input type="text" name="wname" id="catename" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['keywords']->value['wname'];?>
" /> <span class='f_red' id="dcatename"></span></td>
	  </tr>
	  <tr>
		<th width="110">自定义目录：<span class='f_red'>*</span></th>
		<td colspan="2">
		<input type="text" name="word" id="word" class="input-txt word_url" value="<?php echo $_smarty_tpl->tpl_vars['keywords']->value['word'];?>
" /> 
		<span id="word_btn">自动获取</span>
		<span class='f_red' id="wordname"></span>( 必须是是英文字符串组成 )	
		</td>
	  </tr>
	  <tr>
		<th>样式图片：<span class="f_red"></span></th>
		<td style="width:305px;">
		  <input type="hidden" name="uploadfiles" id="uploadfiles" value="<?php echo $_smarty_tpl->tpl_vars['keywords']->value['uploadfiles'];?>
" />
		  <input type="hidden" name="thumbfiles" id="thumbfiles"  value="<?php echo $_smarty_tpl->tpl_vars['keywords']->value['thumbfiles'];?>
" />
		  <?php if ($_smarty_tpl->tpl_vars['keywords']->value['thumbfiles']!=''){?>
		  	 <img class='upload_img' src="../<?php echo $_smarty_tpl->tpl_vars['keywords']->value['thumbfiles'];?>
" />
		  	 <a href="javascript:void(0)" class="pic_remove">[删除]</a>
		 <?php }else{ ?>
		     <img class='upload_img' /> 
		     <a href="javascript:void(0)" class="pic_remove">[删除]</a>
		  <?php }?>
		  <iframe id='iframe_t' frameborder='0' scrolling='no' width='305' height='25' src='upload_input.php?filepath=product'></iframe>
		  <script type="text/javascript">
		   var t = "<?php echo $_smarty_tpl->tpl_vars['keywords']->value['thumbfiles'];?>
";
		    if(t != ''){
		    	$(".upload_img").css("display","block");
		    	$(".pic_remove").css("display","block");
		    	$("#iframe_t").css("display","none");
		    }
		  </script>	
		</td>
		<td style=""></td>
	  </tr> 
	  <tr>
		<th>参数设置：<span class='f_red'></span></th>
		<td colspan="2"><label><input type="checkbox" name="flag" id="flag" value="1" <?php if ($_smarty_tpl->tpl_vars['keywords']->value['flag']==1){?>checked="checked"<?php }?> />&nbsp;&nbsp;状态</label></td>
	  </tr>
	  <tr>
		<th>相关关键词：</th>
		<td colspan="2"><input type="text" name="tag" id="tag" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['keywords']->value['tag'];?>
" /> <span id="smart_keywordsnews">自动选择</span> <span id='dtag' class='f_red'></span> (多个请用英文,号隔开)</td>
	  </tr>
	  <tr>
		<th>详细介绍：</th>
		<td colspan="2">
		  <script id="container" name="content" type="text/javascript"><?php echo $_smarty_tpl->tpl_vars['keywords']->value['content'];?>
</script>
		  <script type="text/javascript">var ue = UE.getEditor('container');</script>
		  <span id='dcontent' class='f_red'></span>
		</td>
	  </tr>
	</table>
	<table class='table_form' style="display:none;">
	  <tr>
		<th width="110">Title：<span class='f_red'></span></th>
		<td><input type="text" name="wtitle" id="wtitle" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['keywords']->value['wtitle'];?>
" /> <span class='f_red' id="dcatename"></span></td>
	  </tr>
	  <tr>
		<th width="110">Keywords：<span class='f_red'></span></th>
		<td><input type="text" name="wkeywords" id="wkeywords" class="input-txt" value="<?php echo $_smarty_tpl->tpl_vars['keywords']->value['wkeywords'];?>
" /> <span class='f_red' id="dcatename"></span></td>
	  </tr>
	  <tr>
		<th>Description：</th>
		<td>
			<textarea name="wdescription" id="wdescription" style='width:60%;height:65px;overflow:auto;color:#444444;'><?php echo $_smarty_tpl->tpl_vars['keywords']->value['wdescription'];?>
</textarea><br />（200字符以内）
		</td>
	  </tr>
	</table>
	<table class='table_form'>
	  <tr>
		<th width="110"></th>
		<td><input type="submit" name="btn_save" class="button" value="添加保存" /></td>
	  </tr>
	</table>
	</form>
  </div>
  <div style="clear:both;"></div>
</div>
<?php }?>
  <script type="text/javascript">
    $(".title span").click(function(){
    	var index = $(this).index();
    	$(this).addClass("pro_hover").siblings("span").removeClass("pro_hover");
    	if(index == 1){
    		$("#myform .table_form").eq(0).show();
    		$("#myform .table_form").eq(1).hide();
    	}else if(index == 2){
    		$("#myform .table_form").eq(1).show();
    		$("#myform .table_form").eq(0).hide();
    	}
    });
  </script>
<script type="text/javascript">
function checkform(){
	if($("#wname").val() == ''){
		alert('关键词名称不能为空！');
		return false;
	}
}
</script>

</body>
</html><?php }} ?>